Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 7 - Process Management / Process Management Reference
Functions / Working With Deferred Tasks


OTDestroyDeferredTask

Destroys a deferred task created with the OTCreateDeferredTask function.

C INTERFACE
OSStatus OTDestroyDeferredTask(long dtCookie)
C++ INTERFACES
None. C++ applications use the C interface to this function.

PARAMETERS
dtCookie
A reference that identifies the task to be destroyed.
DESCRIPTION
The OTDestroyDeferredTask function makes the dtCookie reference invalid and frees any resources allocated to the task when it was created. You can call this function at any time when you no longer need to schedule the deferred task object. If dtCookie is invalid (a value of 0), the function returns kOTNoError and does nothing.

If you try to destroy a deferred task that is still scheduled, the kEAgainErr
error can occur. This is a rare situation that can only happen when you try
to destroy the task from within an interrupt service routine or within
another deferred task.

SEE ALSO
To create a deferred task object for execution at deferred task time, call the OTCreateDeferredTask function (page 7-14).

To schedule a task for execution at deferred task time, call the OTScheduleDeferredTask function (page 7-17).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996